package ldkxingzhe.ldkxingzhedemo.view.sortlistview;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import java.util.ArrayList;
import java.util.List;

import ldkxingzhe.ldkxingzhedemo.R;

/**
 * Created by Administrator on 2016/3/18.
 */
public class SortListViewActivity extends AppCompatActivity {
    @SuppressWarnings("unused")
    private static final String TAG = "SortListViewActivity";
    private static final String[] STRING_NAME = new String[]{
            "成龙", "李连杰", "甄子丹", "李冰冰",
            "和解", "魏鹏", "呼吁", "躺会", "李鹏远",
            "卢尚红", "马物超", "黄增鑫", "黄济民","孙佳斌",
            "张杰", "徐泽", "赵志豪", "石再峰",
            "命运之子", "耶稣", "上帝", "圣父", "圣灵",
            "三位一体", "中国古典哲学", "希腊哲学", "马克思主义哲学",
            "乌托邦", "犹太民族", "摩尔", "宙斯", "轩辕",
            "人族", "秦始皇", "汉武帝", "老子"
    };

    private SortListView<String> modelSortListView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sort_list_view);
        modelSortListView = (SortListView<String>) findViewById(R.id.sort_list_view);

        List<SortModel<String>> modelList = new ArrayList<>();
        for(int i = 0; i < STRING_NAME.length; i++){
            modelList.add(new SortModel<String>(STRING_NAME[i]));
        }
        modelSortListView.setListData(modelList);
    }
}
